package com.example.testdemo.kinetic.data;

public class DataOfEnemyTank extends DataOfTank {
	public static final int STRENGTH_1 = 1;
	
	public static final int DEFENCE_1 = 1;
	
	public static final int MOVE_SPEED_1 = 50;
	
	public static final int FIRE_SPEED_1 = 5; // 1shoot per 2seconds
	
	private int mFireSpeed = 0;
	private int mFireSpeed_d = 0;
	
	public DataOfEnemyTank(int strength, int defence, int moveSpeed, int fireSpeed) {
	    super(strength, defence, moveSpeed);
	    mFireSpeed = fireSpeed;
	    mFireSpeed_d = fireSpeed;
    }
	
	public void setFireSpeed(int fireSpeed) {
		mFireSpeed = fireSpeed;
	}

	/**
	 * 30frame/second / 2shoot/second = 15 counts -> 30x10 / 2x10 = 15counts
	 * 30frame/second / 1shoot/second = 30 counts -> 30x10 / 1x10 = 30counts
	 * 30frame/second . 0.5shoot/second = 60 counts -> 30x10 / 0.5x10 = 60counts
	 */
	public int getFireSpeedCounter() {
		return 300 / mFireSpeed;
	}

	@Override
    public void reset() {
		super.reset();
		mFireSpeed = mFireSpeed_d;
    }
}
